package com.heima.media.controller;


import com.heima.common.dto.ResponseResult;
import com.heima.media.dto.LoginDto;
import com.heima.media.service.IWmUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
@Api(tags = "自媒体人登录")
public class LoginController {
    @Autowired
    private IWmUserService wmUserService;

    @PostMapping("/in")
    @ApiOperation(value = "login", notes = "自媒体人登录")  // value指名称  notes 备注
    @ApiModelProperty(name = "dto", required = true, dataType = "LoginDto")
    public ResponseResult login(@RequestBody LoginDto dto){
        return wmUserService.login(dto);
    }

}
